@props([
    'title' => '数据列表',
    'description' => '管理系统中的数据',
    'total' => 0,
    'icon' => null,
    'emptyMessage' => '暂无数据',
    'emptyDescription' => '开始创建第一个项目吧'
])

<div class="bg-white shadow-lg rounded-xl border border-gray-100">
    <div class="px-6 py-6 border-b border-gray-200">
        <div class="flex items-center justify-between">
            <div class="flex items-center">
                @if($icon)
                    <svg class="w-6 h-6 text-indigo-600 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        {!! $icon !!}
                    </svg>
                @endif
                <h2 class="text-xl font-semibold text-gray-900">{{ $title }}</h2>
            </div>
            <div class="flex items-center space-x-3">
                <span class="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-indigo-100 text-indigo-800">
                    共 {{ $total }} 个项目
                </span>
            </div>
        </div>
        <p class="mt-2 text-sm text-gray-600">{{ $description }}</p>
    </div>

    @if($slot->isNotEmpty())
        {{ $slot }}
    @else
        <div class="text-center py-12">
            <svg class="mx-auto h-12 w-12 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path>
            </svg>
            <h3 class="mt-2 text-sm font-medium text-gray-900">{{ $emptyMessage }}</h3>
            <p class="mt-1 text-sm text-gray-500">{{ $emptyDescription }}</p>
        </div>
    @endif
</div>
